<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
         Schema::create('order', function (Blueprint $table) {
            $table->string('oid')->comment('订单号');
            $table->unsignedInteger('uid')->default(0)->comment('下单人');
            $table->string('rec')->nullable()->comment('收货人');
            $table->string('addr')->nullable()->comment('收货地址');
            $table->string('tel')->nullable()->comment('收货人电话');
            $table->unsignedInteger('ormb')->nullable()->comment('商品价格');
            $table->unsignedInteger('ocnt')->nullable()->comment('商品总数');
            $table->unsignedInteger('status')->default(0)->comment('状态','0','未发货','1','已发货，未收货','2','已收货');
            $table->string('umsg')->nullable()->comment('买家留言');
            $table->string('otime')->nullable()->comment('下单时间');
            
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::drop('order');
    }
}
